const http = require("node:http");
const url = require("node:url");
http
  .createServer((req, res) => {
    const { pathname } = url.parse(req.url);
    console.log("pathname: ", pathname);
    if (pathname === "/api") {
      res.end("proxy success");
    }
  })
  .listen(3000, () => {
    console.log("Server running at http://127.0.0.1:3000/");
  });
